<script lang='ts' setup>
// import { reactive,onMounted,ref} from 'vue'

const props = withDefaults(defineProps<{
	previewInfo: Function
    tableData: Array<any>
}>(), {
    tableData: () => ([
        {
            id:1,
            storeName: '雁塔店',
			grantCouponCount: 4566,
			grantCouponMoney: 897,
			accountCouponCount: 745,
			accountCouponMoney: 897,
			notuseCouponCount: 963,
			notuseCouponMoney: 897,
			totalCouponDebtCount: 654,
			totalCouponDebtMoney: 254,
        }
    ]),
	previewInfo: (id: number) => {}
})

const previewInfo = (id: number) => {
	props.previewInfo(id)
}
</script>

<template>
    <main>
        <el-table :data="props.tableData" style="width: 100%">
				<el-table-column label="门店"  prop="storeName" />

				<el-table-column label="已发放代金券数量"  prop="grantCouponCount" />
				<el-table-column label="已发放代金券金额"  prop="grantCouponMoney" />
				<el-table-column label="待到账代金券数量"  prop="accountCouponCount" />
				<el-table-column label="待到账代金券金额"  prop="accountCouponMoney" />
				<el-table-column label="未使用代金券数量"  prop="notuseCouponCount" />
				<el-table-column label="未使用代金券金额"  prop="notuseCouponMoney" />
				<el-table-column label="总计代金券负债数量"  prop="totalCouponDebtCount" />
				<el-table-column label="总计代金券负债金额"  prop="totalCouponDebtMoney" />

				<el-table-column label="操作">
					<template #default="scope">
						<el-link :underline="false" type="primary" @click="previewInfo(scope.row.id)">查看详情</el-link>
					</template>
				</el-table-column>
			</el-table>
    </main>
</template>

<style lang='scss' scoped>

</style>